﻿#include "widget.h"
#include <QApplication>
#include <QFile>
#include <QDebug>
#include <QDateTime>

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QApplication a(argc, argv);

    //加载样式表
    QString qss;
    QFile file(":/res/flatgray.css");
    if (file.open(QFile::ReadOnly)) {
        qss = file.readAll();
        QString paletteColor = qss.mid(20, 7);
        //qApp->setPalette(QPalette(paletteColor));
        qApp->setStyleSheet(qss);
        file.close();
    }

    QFont font;
    font.setFamily("MicroSoft Yahei");
    font.setPixelSize(14);
    font.setWeight(QFont::Medium);
    qApp->setFont(font);

    Widget w;
    w.show();

    return a.exec();
}
